Clean up config.Printers imports #1534
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR cleans up
config.Printersimports to make them more grep-able. These changes go in pair with the following updates on https://github.com/lampepfl/dotty/wiki/Workflow:Compiling files with dotc
From sbt:
From terminal:
Here are some useful debugging :
-Xprint:PHASE1,PHASE2,...or-Xprint:all: prints theASTafter each specified phase. Phase names can be found by searchingsrc/dotty/tools/dotc/transform/forphaseName.-Ylog:PHASE1,PHASE2,...or-Ylog:all: enablesctx.log("")logging for the specified phase.-Ycheck:allverifies the consistency ofASTnodes between phases, in particular checks that types do not change (option enabled in tests)Additional logging information can be obtained by changes some
noPrintertonew Printerinsrc/dotty/tools/dotc/config/Printers.scala. This enables thesubtyping.println("")andctx.traceIndented("", subtyping)style logging.Running tests
From sbt:
Type Stealer
There is no power mode for the repl yet, but you can inspect types with the type stealer:
Now, you can define types and access their representation. For example:
Pretty-printing
Many objects in the dotc compiler implement a
Showabletrait (e.g.Tree,Symbol,Type). These objects may be prettyprinted using the.showmethod